package com.entity;

/**
 * Author: foshou.zhang
 * Date : 2016/3/6 0006
 * Time :下午 4:33
 */
public class Order {
    private Integer id;
    //订单号(系统订单号规则：XXXX（固定字符）+年（后两位）月日+流水号。流水号每天重新从1开始。)',
    private String orderNo;//订单号
    private String bookName;//书名
    private Integer userId;//用户的id
    private Double price;//价格
    private Integer number;//购买的数量

    public Order() {
    }

    public Order(String orderNo, String bookName, Integer userId, Double price, Integer number) {
        this.orderNo = orderNo;
        this.bookName = bookName;
        this.userId = userId;
        this.price = price;
        this.number = number;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderNo='" + orderNo + '\'' +
                ", bookName='" + bookName + '\'' +
                ", userId=" + userId +
                ", price=" + price +
                ", number=" + number +
                '}';
    }
}
